﻿IF EXISTS (SELECT * from sys.procedures p left join sys.schemas s on p.schema_id = s.schema_id where p.name='reference_insert' and s.name='Meta')
DROP PROCEDURE [Meta].reference_insert
GO
CREATE PROCEDURE [Meta].reference_insert 
@PK uniqueidentifier, 
@LastUpdate datetime, 
@Google nvarchar(32), 
@GoogleLastUpdate datetime, 
@ZohoCRM int, 
@ZohoCRMLastUpdate datetime, 
@From nvarchar(50), 
@Validated bit
AS
BEGIN
INSERT INTO [Meta].[References]
([id_reference], [last_update], [Google], [Google_last_update], [ZohoCRM], [ZohoCRM_last_update], [from], [Validated])
VALUES (@PK,@LastUpdate,@Google,@GoogleLastUpdate,@ZohoCRM,@ZohoCRMLastUpdate,@From,@Validated)
END